//
//  MyView.m
//  ReactiveObjCDemo
//
//  Created by jianzhao4 on 2017/9/11.
//  Copyright © 2017年 Xwoder. All rights reserved.
//

#import "MyView.h"

@implementation MyView

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor orangeColor];
        
        UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] init];
        [tap.rac_gestureSignal subscribeNext:^(__kindof UIGestureRecognizer * _Nullable x) {
            !self.delegateSignal ? : [self.delegateSignal sendNext:self];
        }];
        [self addGestureRecognizer:tap];
    }
    return self;
}

@end
